﻿using ManagementSystem.Model.EF;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace ManagementSystem
{
    /// <summary>
    /// 按学生姓名查询结果显示窗体
    /// </summary>
    public partial class FormStudent2 : Form
    {
        public FormStudent2()
        {
            InitializeComponent();
        }

        private void FormStudent2_Load(object sender, EventArgs e)
        {

        }

        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="sName"></param>
        public FormStudent2(IEnumerable<Student> sName)
        {
            InitializeComponent();

            //返回按姓名查询的结果
            dataGridView1.DataSource = new BindingList<Student>(sName.ToList());
        }
    }
}
